home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
prolog
/
brklyprl.lha
/
Emulator
/
Tests
/
Passed
/
test13.pl
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1989-04-14
|
264 b
|
10 lines
/* Copyright (C) 1988, 1989 Herve' Touati, Aquarius Project, UC Berkeley */
/* some arithmetic */
main :- a(X), b(Y), c(Z), W is Z*Z - X*X - Y*Y, W == 0, write(ok), nl.
a(X) :- X is 1 + 1 + 1.
b(Y) :- X is 1 + 1, Y is X + X.
c(Z) :- X is 2, Y is 3, Z is X + Y.